package com.yundong.gongchengji.ui.mian;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.yundong.gongchengji.R;
import com.yundong.gongchengji.base.BaseActivity;
/**
 * 登陆
 * Created by ls on 2017/2/21.
 */

public class LoginActivity extends BaseActivity implements View.OnClickListener{
    private static final int REGOSTER_CODE=1;//注册
    private static final int FORGET_CODE=2;//忘记密码

    private TextView textZhuche;
    private TextView textForget;
    @Override
    public int getContentViewId() {
        return R.layout.activity_login;
    }



    @Override
    protected void initView(Bundle savedInstanceState) {
        setLeft();
        setTitle("登陆");
        textZhuche= (TextView) findViewById(R.id.text_zhuche);
        textZhuche.setOnClickListener(this);
        textForget= (TextView) findViewById(R.id.text_forget);
        textForget.setOnClickListener(this);
    }

    @Override
    protected void initVariable() {

    }

    @Override
    protected void processLogic(Bundle savedInstanceState) {

    }

    @Override
    public void onClick(View view) {
        Intent intent=null;
        switch (view.getId()){
            case R.id.text_zhuche:
                intent=new Intent(LoginActivity.this,RegisterActivity.class);
                startActivityForResult(intent,REGOSTER_CODE);
                break;
            case R.id.text_forget:
                intent=new Intent(LoginActivity.this,ForgetPwdActivity.class);
                startActivityForResult(intent,FORGET_CODE);
                break;
        }
    }
}
